package com.example.douyin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.douyin.entity.Watch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface WatchMapper extends BaseMapper<Watch> {

    @Select("SELECT video_id FROM watch WHERE user_id = #{userId}")
    List<Long> findWatchedVideoIdsByUserId(Long userId);
}
